package com.rslai.commons.http.tools;

import org.apache.http.impl.client.DefaultHttpClient;

/**
 * Strategies
 */
public class Strategies {

    /**
     * 设置 keepAlive
     * @param client HttpClient
     * @param time 持续时间（ms）
     */
    public static void keepAlive(DefaultHttpClient client, long time) {
        client.setKeepAliveStrategy(new ConnectionKeepAliveStrategy(time));
    }

}
